package org.flynenu.ums.logic.impl;

import org.flynenu.ums.common.ticket.Ticket;
import org.flynenu.ums.common.ticket.TicketGenerator;
import org.flynenu.ums.common.ticket.TicketParameter;
import org.flynenu.ums.logic.IPrinter;


public class PrinterImpl implements IPrinter {
	private TicketGenerator ticketGenerator = null;

	public void setTicketGenerator(TicketGenerator ticketGenerator) {
		this.ticketGenerator = ticketGenerator;
	}

	@Override
	public Ticket generateTickeNo(int uid) {
		TicketParameter parameter = new TicketParameter();
		parameter.setUid(uid);
		Ticket ticket = ticketGenerator.generate(parameter);
		
		return ticket;
	}

}
